.parent {
  width: 500px;
  padding: 8px;
  background-color: pink;
}

.a {
  width: 100%;
  padding: 8px;
  background-color: skyblue;
  box-sizing: border-box;
}

.b {
  width: 100%;
  padding: 8px;
  background-color: purple;
  box-sizing: border-box;
}